import React from 'react';
import { connect } from 'dva';
import PropTypes from 'prop-types';
import {Link} from 'dva/router';
import {Button,Row,Col,Layout, Menu, Breadcrumb,Select,Icon,Form,Input} from 'antd';
import reqwest from 'reqwest';
import style from '../../styles/ResetInput.less';
import inStyle from '../../styles/Info.less'
const FormItem = Form.Item;
const Option =Select.Option;
class CommodDetails extends React.Component{
	constructor(props){
		super(props);
		this.state={

		}
	}
	render(){
		const formItemLayout = {
      labelCol: { span: 8},
      wrapperCol: { span: 14 },
      style:{minWidth:200}
    };
  	const {getFieldDecorator}=this.props.form;
		return(
			<Layout style={{background:'#fff'}}>
				<Form className={`${inStyle.ncc_left_layout}`}>
					<Row>
						<Breadcrumb style={{ height:60,lineHeight:'60px',fontSize:14,marginTop:20}}>
              <Breadcrumb.Item>创建商品</Breadcrumb.Item>
              <Breadcrumb.Item>商品信息</Breadcrumb.Item>
	       		</Breadcrumb>
	       	</Row>
       		<Row type='flex'>
	       		<Col sm={{span :8,pull:0}} xs={{span:24,pull:3}} >
							<FormItem {...formItemLayout} label='商品名称'>
								{getFieldDecorator('spname',{
								})(
									<Input className={`${style.ncc_reset_input}`} placeholder='请输入地址' />
								)}
							</FormItem>
						</Col>
						<Col sm={{span :8,pull:0}} xs={{span:24,pull:3}} >
							<FormItem {...formItemLayout} label='状态'>
								{getFieldDecorator('status',{
								})(
									<Input className={`${style.ncc_reset_input}`} placeholder='请输入地址' />
								)}
							</FormItem>
						</Col>
					</Row>
					<Row >
						<Col sm={{span :8,pull:0}} xs={{span:24,pull:3}} >
							<FormItem {...formItemLayout} label='编码'>
								{getFieldDecorator('code',{
								})(
									<Input className={`${style.ncc_reset_input}`} placeholder='请输入地址' />
								)}
							</FormItem>
						</Col>
						<Col sm={{span :8,pull:0}} xs={{span:24,pull:3}} >
							<FormItem {...formItemLayout} label='分类'>
								{getFieldDecorator('ftype',{
								})(
									<Input className={`${style.ncc_reset_input}`} placeholder='请输入地址' />
								)}
							</FormItem>
						</Col>
					</Row>
					<Row >
					<Col span={24}>
						<Breadcrumb style={{ height:60,lineHeight:'60px',fontSize:14,marginTop:20}}>
              <Breadcrumb.Item>价格信息</Breadcrumb.Item>
	       		</Breadcrumb>
       		</Col>
       		</Row>
					<Row>
	       		<Col sm={{span :8,pull:0}} xs={{span:24,pull:3}} >
							<FormItem {...formItemLayout} label='单价'>
								{getFieldDecorator('price',{
								})(
									<Input className={`${style.ncc_reset_input}`} placeholder='请输入地址' />
								)}
							</FormItem>
						</Col>
						<Col sm={{span :8,pull:0}} xs={{span:24,pull:3}} >
							<FormItem {...formItemLayout} label='成本价格'>
								{getFieldDecorator('costprice',{
								})(
									<Input className={`${style.ncc_reset_input}`} placeholder='请输入地址' />
								)}
							</FormItem>
						</Col>
					</Row>
					<Row>
					<Col span={24}>
						<Breadcrumb style={{ height:60,lineHeight:'60px',fontSize:14,marginTop:20}}>
              <Breadcrumb.Item>库存信息</Breadcrumb.Item>
	       		</Breadcrumb>
       		</Col>
       		</Row>
       		<Row >
						<Col sm={{span :8,pull:0}} xs={{span:24,pull:3}} >
							<FormItem {...formItemLayout} label='库存数量'>
								{getFieldDecorator('stock',{
								})(
									<Input className={`${style.ncc_reset_input}`} placeholder='请输入地址' />
								)}
							</FormItem>
						</Col>
						<Col sm={{span :8,pull:0}} xs={{span:24,pull:3}} >
							<FormItem {...formItemLayout} label='基本单位'>
								{getFieldDecorator('unit',{
								})(
									<Input className={`${style.ncc_reset_input}`} placeholder='请输入地址' />
								)}
							</FormItem>
						</Col>
					</Row>
					<Row>
					<Col span={24}>
						<Breadcrumb style={{ height:60,lineHeight:'60px',fontSize:14,marginTop:20}}>
              <Breadcrumb.Item>备注</Breadcrumb.Item>
	       		</Breadcrumb>
       		</Col>
       		</Row>
       		<Row>
       		<Col  >
						<FormItem labelCol={ {span:2}} wrapperCol={{span:13}} label='备注'>
							{getFieldDecorator('beizhu',{
							})(
								<Input className={`${style.ncc_reset_input}`} placeholder='请输入地址' />
							)}
						</FormItem>
					</Col>
       		</Row>
				</Form>
			</Layout>
		)
	}
}

const CommodDetailsForm = Form.create()(CommodDetails);

export default connect()(CommodDetailsForm);